package com.example.livemall.mapper;

import com.example.livemall.entity.LoginLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * 登录服务数据层
 */
@Mapper
public interface LoginMapper {

    /**
     * 新增登录日志到 MongoDB
     *
     * @param loginLog
     */
    @Insert("insert into login_log (id, username, type, login_time, is_success, message) value " +
            "(#{id}, #{username}, #{type}, #{loginTime}, #{isSuccess}, #{message})")
    void saveLoginLog(LoginLog loginLog);

}
